<?php
namespace app\common\controller;

use think\Controller;


class Home extends Controller
{
    protected $userid;
    protected $username;

    protected function initialize()
    {
        header("Content-Type:text/html; charset=utf-8");
        $userinfo = cookie('userinfo');
        if (empty($userinfo)) {
            $this->assign('is_logined', 0);
        } else {
            //用户ID
            $this->userid = $userinfo['userid'];
            $this->username = $userinfo['username'];
            $this->assign('is_logined', 1);
        }

    }


}